HOST = "https://qyapi.weixin.qq.com/cgi-bin/"
CORPID = "wwcb3168f059eec7d6"
AGENTID = "1000002"
SECRET = "d4I_Lj-wFI0rv6r81WNHt9RtvMoBmQfEktcNpdgvbkM"

# 构造网页授权链接
# 默认登录
oauthurl = """
 https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwcb3168f059eec7d6&redirect_uri=https%3A%2F%2Fwecom.qhduhu.com%3A8889&response_type=code&scope=snsapi_base&agentid=1000002#wechat_redirect
"""
# 获取访问用户身份
{'userid': 'DuHu', 'errcode': 0, 'errmsg': 'ok'}
# 读取成员
{
    "errcode": 0,
    "errmsg": "ok",
    "userid": "DuHu",
    "name": "杜虎",
    "department": [4],
    "position": "",
    "status": 1,
    "isleader": 1,
    "extattr": {"attrs": []}, "telephone": "", "enable": 1, "hide_mobile": 0, "order": [0],
    "main_department": 4, "alias": "", "is_leader_in_dept": [1], "direct_leader": []
}
# 获取部门列表
{"errcode": 0, "errmsg": "ok. WARNING: field `id` expect type `uint32`. ",
 "department": [{"id": 1, "name": "都护科技", "parentid": 0, "order": 100000000, "department_leader": []},
                {"id": 2, "name": "其他（待设置部门）", "parentid": 1, "order": 100000000, "department_leader": []},
                {"id": 3, "name": "政企部", "parentid": 1, "order": 99999000, "department_leader": []},
                {"id": 4, "name": "工业团队", "parentid": 3, "order": 100000000, "department_leader": ["DuHu"]}]
}

# 获取单个部门详情





# 获取客户列表
{"errcode": 0, "errmsg": "ok", "external_userid": ["wogkTKDAAAJ_P8BTYqRTxHGW2dm4XzyQ"]}
# 获取客户详情
{"errcode": 0, "errmsg": "ok", "userid": "DuHu", "name": "杜虎", "department": [4], "position": "", "status": 1,
 "isleader": 1, "extattr": {"attrs": []}, "telephone": "", "enable": 1, "hide_mobile": 0, "order": [0],
 "main_department": 4, "alias": "", "is_leader_in_dept": [1], "direct_leader": []}
